#pragma once
#include <stdint.h>
#include "hrd_bitmask.h"

/* 
    coordinate demonstration
    11111111 high bits
    10000001
    10000001
    10000001
    10000001
  y 10000001
  ^ 10000001
  | 11111111 low bits
    -> x
 */

#define MIN_COORDINATE 0
#define MAX_COORDINATE 7
#define MAX_COORDINATE_NUMBER 64

struct coordinate_s {
    uint8_t x : 4;
    uint8_t y : 4;
};

uint8_t HrdCoord_BitmaskToCoordinateList(hrd_bitmask_t hrd_bitmask, struct coordinate_s *dest_coordinate_list);

hrd_bitmask_t HrdCoord_CoordinateToBitmask(struct coordinate_s coordinate);

hrd_bitmask_t HrdCoord_CoordinateListToBitmask(struct coordinate_s *coordinate_list, uint8_t coordinate_number);